package com.thread.test;

import java.util.concurrent.CountDownLatch;

/**
 * @Author milian
 * @Date 2021/8/9 0009 10:59
 */
public class game extends Thread{
    private CountDownLatch countDownLatch;
    public game(CountDownLatch countDownLatch){
        this.countDownLatch = countDownLatch;
    }

    @Override
    public void run() {
        try {
            countDownLatch.await();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("所有玩家准备就绪，游戏开始.......");
    }
}
